<?php
namespace app\plugin\controller;
use app\common\controller\Base;
use exportExcel\ExportExcel;
use think\Db;

class Excel extends Base {

   public function index($rows)
    {
        $excel = new ExportExcel();
        set_time_limit(0);
        $res = [
            'title'=>$rows['title'],//表单题头
            'filename'=>$rows['filename'],//文件名
            'key'=>$rows['key'],//键值组
            'data'=>$rows['data'],//数据组
        ];
        $excel->index($res);
    }

}